package com.qianbao.qianbaobusiness.json;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.Ignore;
import android.arch.persistence.room.PrimaryKey;
import android.support.annotation.Keep;
import android.support.annotation.NonNull;

import java.util.List;

/**
 * @author: Routee
 * @date 2018/6/26
 * @mail wangc4@qianbaocard.com
 * ------------1.本类由Routee开发,阅读、修改时请勿随意修改代码排版格式后提交到git。
 * ------------2.阅读本类时，发现不合理请及时指正.
 * ------------3.如需在本类内部进行修改,请先联系Routee,若未经同意修改此类后造成损失本人概不负责。
 */
@Keep
public class PcdBean {

    private String              version;
    private List<CitysBean>     citys;
    private List<DistrictsBean> districts;
    private List<ProvincesBean> provinces;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public List<CitysBean> getCitys() {
        return citys;
    }

    public void setCitys(List<CitysBean> citys) {
        this.citys = citys;
    }

    public List<DistrictsBean> getDistricts() {
        return districts;
    }

    public void setDistricts(List<DistrictsBean> districts) {
        this.districts = districts;
    }

    public List<ProvincesBean> getProvinces() {
        return provinces;
    }

    public void setProvinces(List<ProvincesBean> provinces) {
        this.provinces = provinces;
    }

    @Entity(tableName = "citys")
    public static class CitysBean {
        @NonNull
        @PrimaryKey(autoGenerate = true)
        private int     id;
        @ColumnInfo(name = "character")
        private String  character;
        @ColumnInfo(name = "code")
        private String  code;
        @ColumnInfo(name = "hot")
        private String  hot;
        @ColumnInfo(name = "name")
        private String  name;
        @ColumnInfo(name = "open")
        private String  open;
        @ColumnInfo(name = "provincecode")
        private String  provincecode;
        @Ignore
        private List<?> districtList;

        public String getCharacter() {
            return character;
        }

        public void setCharacter(String character) {
            this.character = character;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getHot() {
            return hot;
        }

        public void setHot(String hot) {
            this.hot = hot;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getOpen() {
            return open;
        }

        public void setOpen(String open) {
            this.open = open;
        }

        public String getProvincecode() {
            return provincecode;
        }

        public void setProvincecode(String provincecode) {
            this.provincecode = provincecode;
        }

        public List<?> getDistrictList() {
            return districtList;
        }

        public void setDistrictList(List<?> districtList) {
            this.districtList = districtList;
        }

        @NonNull
        public int getId() {
            return id;
        }

        public void setId(@NonNull int id) {
            this.id = id;
        }
    }

    @Entity(tableName = "districts")
    public static class DistrictsBean {
        @NonNull
        @PrimaryKey(autoGenerate = true)
        private int     id;
        @ColumnInfo(name = "citycode")
        private String  citycode;
        @ColumnInfo(name = "code")
        private String  code;
        @ColumnInfo(name = "name")
        private String  name;
        @Ignore
        private List<?> areaList;

        @NonNull
        public int getId() {
            return id;
        }

        public void setId(@NonNull int id) {
            this.id = id;
        }

        public String getCitycode() {
            return citycode;
        }

        public void setCitycode(String citycode) {
            this.citycode = citycode;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public List<?> getAreaList() {
            return areaList;
        }

        public void setAreaList(List<?> areaList) {
            this.areaList = areaList;
        }
    }

    @Entity(tableName = "province")
    public static class ProvincesBean {
        @NonNull
        @PrimaryKey(autoGenerate = true)
        private int     id;
        @ColumnInfo(name = "code")
        private String  code;
        @ColumnInfo(name = "name")
        private String  name;
        @ColumnInfo(name = "shortname")
        private String  shortName;
        @Ignore
        private List<?> cityList;

        @NonNull
        public int getId() {
            return id;
        }

        public void setId(@NonNull int id) {
            this.id = id;
        }

        public String getCode() {
            return code;
        }

        public void setCode(String code) {
            this.code = code;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getShortName() {
            return shortName;
        }

        public void setShortName(String shortName) {
            this.shortName = shortName;
        }

        public List<?> getCityList() {
            return cityList;
        }

        public void setCityList(List<?> cityList) {
            this.cityList = cityList;
        }
    }
}
